using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.IO;
using System.Drawing;

namespace KiemBao
{
    class DoThi
    {
        public static void Frame(Graphics g, float max_x, float max_y)
        {
            Pen pen = new Pen(Color.Red, 3f);
            g.DrawRectangle(pen, (float)23f, (float)23f, (float)(max_x - 26f), (float)(max_x - 26f));
        }
        public static void Matrix(Graphics g, float max_x, float max_y, float k)
        {
            float num;
            Pen pen = new Pen(Color.Black, 1f);
            Brush brush = new SolidBrush(Color.Green);
            Font font = new Font("Tomaho",5f);
            for (num = 24f; num <= max_x; num += k)
            {
                g.DrawLine(pen, num, 24f, num, max_y - 5f);
                float num2 = (num - 24f) / k;
                double num3 = num2;
                g.DrawString(Math.Round(num3, 0).ToString(), font, brush, (float)((num + (k / 2f)) - 3f), (float)(200f / k));
            }
            for (num = 24f; num <= max_y; num += k)
            {
                g.DrawLine(pen, 24f, num, max_x - 5f, num);
                float num4 = (num - 24f) / k;
                double num5 = num4;
                g.DrawString(Math.Round(num5, 0).ToString(), font, brush, (float)(200f / k), (float)((num + (k / 2f)) - 3f));
            }
        }
        public static void State(ArrayList TapTrangThai, Graphics g, float k, string StateS)
        {
            Image image = Image.FromFile(StateS);
            foreach (Node state in TapTrangThai)
            {
                g.DrawImage(image, (float)((state.X * k) + 25f), (float)((state.Y * k) + 25f), (float)(k - 3f), (float)(k - 3f));
            }
        }
    }
}
